<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>球队查询</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="/css/city-picker.css">
    <!--<link rel="stylesheet" type="text/css" href="/plugins/bootstrap/css/bootstrap.css">-->
    <!--<link rel="stylesheet" href="//cdn.bootcss.com/zui/1.8.1/css/zui.min.css">-->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin layui-bg-blue">
    <!-- 头部区域 -->
    <div th:replace="index::topbar"></div>

    <!-- 左侧导航区域 -->
    <div th:replace="index::sidebar"></div>

    <!-- 底部固定区域 -->
    <div th:replace="index::bottombar"></div>

    <!-- 内容主体区域 -->
    <div class="layui-body">
        <div class="layui-tab layui-tab-brief" lay-filter="condition">
            <!-- 选择联赛 -->

            <div class="layui-form">
                <form th:action="@{matchInformation}" method="post">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <div class="layui-input-block" style="width: 35%;display: inline-block">
                            <!--<input type="text" name="title" required  lay-verify="required" placeholder="请输入联赛名称" autocomplete="off" class="layui-input">-->
                            <select name="leagueName" lay-verify="required">
                                <option th:each="league:${leagues}" >[[${league.leagueName}]]</option>
                            </select>
                        </div>
                        <button style="display: inline-block" class="layui-btn layui-btn-normal" type="submit">下一步</button>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>

<!-- 修改密码弹窗 -->
<script type="text/html" id="pswModel1">
    <div id="pswModel" th:replace="index::changePsw">
    </div>
</script>

</body>

<script src="/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/citydata.min.js"></script>
<script type="text/javascript" src="/js/cityPicker-2.0.0.js"></script>

<script>
    layui.use('form', function(){
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });
</script>

<script>
    layui.use('element', function(){
        var element = layui.element;

        //一些事件监听
        element.on('tab(condition)', function(data){
            console.log(data);
        });
    });

    //城市选择器
    var selector=$('#city-picker-search').cityPicker({
        dataJson:cityData,
        renderMode:true,
        search:true,
        autoSelected:true,
        keyboard:true,
        level:2,
        onChoiceEnd:function () {
            console.log(this.values)
        }
    });

    //侧边导航栏展开并选中添加球员选项
    $("#teamManage").addClass("layui-nav-itemed");
    $("#queryTeam").addClass("layui-this");

    //显示个人信息
    function info() {
        layui.use(['layer'], function(){
            var layer = layui.layer;
            layer.open({
                type:1,
                title:'个人信息',
                area:'350px',
                offset:'120px',
                content:'<ul style="padding:25px 35px 8px 35px;">' +
                '<li>用户名：[[${session.loginUser}]]</li>'+
                '<li>手机号：13657936306</li>'+
                '</ul>',
                btn:['确定'],
                btnAlign:'center'
            });
        });
    }

    //修改密码
    function changePassword() {
        layui.use(['layer'],function () {
            var layer=layui.layer;
            layer.open({
                type: 1,
                title: "修改密码",
                area: '400px',
                offset: '120px',
                content: $("#pswModel1").html()
            });
        })
    }
</script>
</html>